/*
 * @(#)WordNet.java	1.0 08/01/07
 *
 * Copyright 2007 Fabio Gasparetti. All rights reserved.
 */

package org.tabularium.text.nlp.wordnet;

import java.util.Iterator;

/**
 * An interface to libraries that retrieve information from WordNet dictionary.
 * 
 * @author Fabio Gasparetti
 * @version 1.0, 08/01/07
 */

public interface WordNet {

	/**
	 * Retrieves all the synsets with any sort of relationships with
	 * the given synset.
	 */
	Synset[] getRelatedSynsets(Synset s);

	
	/**
	 * Retrieves all the synsets that are associated with the given
	 * relationship by the given synset.
	 * <p>
	 * Example: {15129927} "clock time, time" has direct hyponym:
	 * <ul>
	 * <li>{15131598} "spacecraft clock time, SCLK" 
	 * <li>{15166897} "prime time" 
	 * <li>{15228378} "hour, time of day"
	 * </ul> 
	 */
	Synset[] getRelatedSynsets(Synset s, int relationshipType);

	/**
	 * Retrieves the synset associated with a given word.
	 * <p>
	 * If the given word is a collocation, the search depends on the characters
	 * used to separate the tokens, e.g., 'mid-September' is a WordNet noun,
	 * 'mid September' isn't.
	 */
	Synset[] getSynsets(String word, int pos);
	
	/** 
	 * Extracts the synset from a WordSense object
	 */ 
	Synset getSynset(WordSense sense);

	/**
	 * Gets all the words associated with a given synset.
	 * <p>
	 * Example: Synset {11524662} -> "weather, weather condition, conditions, atmospheric condition" 
	 */
	String[] getWords(Synset s);

	/**
	 * Retrieves all the pairs word-senses given a synset.
	 */
	WordSense[] getWordSenses(Synset s);

	/**
	 * Returns an Iterator over the set of Wordnet synsets that satisfy a given
	 * PartOfSpeech.
	 */
	Iterator synsets(int pos);

	/**
	 * Number of times the sense is tagged in various semantic concordance
	 * texts. A zero value indicates that the sense has not been semantically
	 * tagged.
	 */
	int getSynsetFreq(Synset s);
}
